Week 13 ( May 3, 2017 )
measure something: add a sensor to a micro controller board that you have designed and read it
I decided to take IR sensor and connect it to the micro controller. So that I can read using IR sensor.
IR sensor module I am using consist of A transmitter and a reciever. SO when an obstacles come in front of the sensor, Corresponding out put will be obtained. So that output caan be used to read in micro controller.
There are 3 pins in the module I got from the Lab.
VCC:For giving voltage to the Module
GND:Connecting to ground
SIGNAL:Produce output from the sensor whch can be used for micro controller
Here is board layout:
This week I will design a board with a input sensor I chooses infrared sensor for this week so what I did is ,chooses Neils IR board under input week and going to replicate the same.
I managed to draw a schematic diagram as shown in the below image which represents the exact replica of the input Neils board
The image below represents board file ,where I placed the components in the board area and arranged based on my idea so that to reduce maximum cross lines between routes,and I changed the trace width also since our machine in the lab is a little lazy to mill a good board always. Finally managed to draw this.
After generating the board file as usual I need to convert it to GERBER file so as to get it to my machine for milling,so for the same I used the Cam processor and processed the job by choosing the right .cam file for our specific machine in the lab.
So finally it will generate many files out of which we will be using “.cmp” and “.sol” files
After designing I was able to mill my board properly without any problems since I increased the width up to a greater level I can of each individual trace
video1
And did the soldering as did last time I made a component picker table took all the components
CODE
void setup() {
// initialize serial communication at 9600 bits per second:
Serial.begin(9600);
}
// the loop routine runs over and over again forever:
void loop() {
// read the input on analog pin 0:
int sensorValue = analogRead(A0);
// print out the value you read:
Serial.println(sensorValue);
delay(1); // delay in between reads for stability
}
As in the video I have connected a IR sensor in the board and board is connected to FTDI cable as well inorder to view the serial data
video2